home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 06 - 1990 / 06.04 Apr 90 / Messenger Files / Messenger.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-01-11  |  1.8 KB  |  84 lines  |  [TEXT/KAHL]

  1. /********************************
  2. Messenger.h
  3.  
  4. By Kirk Chase with code from Paul Potts
  5.  
  6. Created 10/3/89
  7.  
  8. This is the header file for constants and prototypes of
  9. HandleDialog.c.  This is used to provide a useful set of 
  10. routines to use and modify for working with ModalDialogs
  11. and Alerts
  12. *********************************/
  13.  
  14. #define _H_Messenger
  15.  
  16. #define NUL 0
  17. #define nul 0
  18.  
  19. #define TRUE 1
  20. #define FALSE 0
  21.  
  22. #define edgeCurve        16    /* Constants for drawing roundRect */
  23. #define gapBetween        -4
  24. #define lineSize        3
  25.  
  26. #define theReturnKey 13
  27. #define theEnterKey 3
  28.  
  29. #define MessageBase 3000
  30.  
  31. #define MTop 50
  32. #define MLeft 120
  33. #define MHeight 135
  34. #define MWidth 328
  35.  
  36. #define CENTER 2
  37. #define THIRD 3
  38.  
  39. #define HORIZONTAL 1
  40. #define VERTICAL 0
  41.  
  42. #define noIcon -1
  43.  
  44. #define M_BUTTONLESS 5
  45. #define M_OK 1
  46. #define M_OK_CANCEL 2
  47. #define M_YES_NO 3
  48. #define M_YES_NO_CANCEL 4
  49.  
  50. typedef struct DialogInfo {
  51.     short defaultItem;
  52.     int Buttons;
  53.     int dPlace;
  54.     short dIcon;
  55.     Rect IconRect;
  56.     Rect Button1Rect;
  57.     Rect Button2Rect;
  58.     Rect Button3Rect;
  59.     Rect TextRect;
  60.     Rect dRect;
  61.     int Arrange;
  62.     ProcPtr AddFilter;
  63.     Str255 Button1;
  64.     Str255 Button2;
  65.     Str255 Button3;
  66.     Str255 CharEquiv;
  67.     } DialogInfo, *DialogInfoPointer, **DialogInfoHandle;
  68.  
  69. extern DialogInfo MInfo;
  70. extern int menu_hieght;
  71.  
  72. int MenuBar_Hieght(void);
  73. void GetMInfo(DialogInfoPointer theMInfo);
  74. void SetMInfo(DialogInfo theMInfo);
  75. void SetUpButtons(int numButtons, short theDefault, char *b1, char *b2, char *b3, char *cq);
  76. void SetUpRects(int dHor, int dVer, int bHor, int bVer);
  77. void PositionRect(Rect *smallRect, Rect *largeRect, int HOption, int VOption);
  78. void BoldRect(Rect border);
  79. int DoMessage(char *s0, char *s1, char *s2, char *s3);
  80. void InitMessage();
  81. int ArrangeMessage();
  82. int Message(int theType, int theIcon, char *s0, char *s1, char *s2, char *s3);
  83. int SaveChanges(char *s1, char *s2);
  84. char AnOSError(OSErr theError, char *s1, char *s2);